package com.by.mongo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserDaoMongo {

    @Autowired
    private CustomRepository customRepository;

    public void sava_user() {
        Custom custom = new Custom();
        custom.setName("测试文件");
        customRepository.save(custom);
    }

    public List<Custom> fina_all_user() {
        return  customRepository.findAll();
    }

}
